<?php

namespace App\Models;


use App\Services\ConfigService;

class Appoint extends Base
{
    public function user()
    {
        return $this->belongsTo(User::class, 'user_id');
    }

    public function hero()
    {
        return $this->belongsTo(Hero::class, 'hero_id');
    }

    public function getTimeAttribute($time) {
        return ConfigService::getAll()->where('key', $time)->pluck('value')->first();
        return TimeConfig::where('key', $time)->pluck('value')->first();
    }

}
